
pub enum Color{
    White, Black
}

pub struct Piece{
    color: Color
}

pub struct Point{
    valid: bool,
    index: u8,
    piece: Option<Piece>,
    up: Option<Box<Point>>,
    down: Option<Box<Point>>,
    left: Option<Box<Point>>,
    right: Option<Box<Point>>,
}

impl Point{
    pub fn new(index: u8) -> Point{
        Point{
            valid: true,
            index,
            piece: None,
            up: None,
            down: None,
            left: None,
            right: None
        }
    }
}

pub enum Status{
    Waiting, Put, Kill, Move, Over
}

pub struct Chessboard{
    status: Status,
    points: [Point; 24],
}

impl Chessboard{
    pub fn new() -> Chessboard{
        let point = Point::new(0);
        let mut points: [Point; 24] = [point; 24];
        for i in 0..24u8{
            points[i] = Point::new(i);
        }
        Chessboard{
            status: Status::Waiting,
            points
        }
    }
}